package dao

import (
	"gitee.com/Luna-CY/Golang-Project-Template/internal/context"
	"gitee.com/Luna-CY/Golang-Project-Template/internal/errors"
    "gitee.com/Luna-CY/Golang-Project-Template/model"
)

// SystemSmtpLogAttachment Data access object for SystemSmtpLogAttachment definition
type SystemSmtpLogAttachment interface {
	Transactional
	
	// FindSystemSmtpLogAttachmentByCondition find SystemSmtpLogAttachment by simple condition from db
	FindSystemSmtpLogAttachmentByCondition(ctx context.Context, page int, size int, options ...SystemSmtpLogAttachmentOption) (int64, []*model.SystemSmtpLogAttachment, errors.Error)
	
	// SaveSystemSmtpLogAttachment save SystemSmtpLogAttachment to db
	// if SystemSmtpLogAttachment id is 0, it will create a new record, otherwise, it will update the record
	SaveSystemSmtpLogAttachment(ctx context.Context, systemSmtpLogAttachment *model.SystemSmtpLogAttachment) errors.Error

	// TakeSystemSmtpLogAttachmentByCondition get SystemSmtpLogAttachment by condition from db
	// if SystemSmtpLogAttachment not found, return error type with errors.ErrorTypeRecordNotFound
	TakeSystemSmtpLogAttachmentByCondition(ctx context.Context, options ...SystemSmtpLogAttachmentOption) (*model.SystemSmtpLogAttachment, errors.Error)

	// DeleteSystemSmtpLogAttachmentByCondition delete SystemSmtpLogAttachment by condition from db
	DeleteSystemSmtpLogAttachmentByCondition(ctx context.Context, options ...SystemSmtpLogAttachmentOption) errors.Error

	// BatchTakeSystemSmtpLogAttachmentByCondition get SystemSmtpLogAttachment by condition from db
	BatchTakeSystemSmtpLogAttachmentByCondition(ctx context.Context, options ...SystemSmtpLogAttachmentOption) ([]*model.SystemSmtpLogAttachment, errors.Error)
}

